
package controller;

import java.util.ArrayList;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.Model;
import model.UserDAO;



public class GetContactsXMLAction extends Action {
	
	private UserDAO  userDAO;

    public GetContactsXMLAction(Model model) {
    	userDAO  = model.getUserDAO();
	}

    public String getName() { return "get-contacts-xml.do"; }

	public String perform(HttpServletRequest request, HttpServletResponse response) {
		
    	List<String> errors = new ArrayList<String>();
    	
    	String hashvalue = "EIyI8S0 pEUaCYnEMhD vgiuxFwxpk/OuX8VgF4WTmh4dWVzaGFuLnRhbkBjcm9rcy5ib2RhZG8uaW5mbw==";
    	  
    	String authcode = request.getParameter("authcode");
    	//System.out.println(authcode);
    	if(authcode.trim().equals(hashvalue.trim())){
    		//System.out.println(authcode);
    		return "get-contacts-xml.jsp";
    	}
		return "Wrong password!";		
	}
}
